package com.vanysoft.business.data.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.vanysoft.business.data.dao.CategoryManagerMapper;
import com.vanysoft.business.data.entity.CategoryList;
import com.vanysoft.business.data.entity.CategoryManager;
import com.vanysoft.business.data.service.CategoryManagerService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author YangLei
 * @since 2018-07-09
 */
@Service
public class CategoryManagerServiceImpl extends ServiceImpl<CategoryManagerMapper, CategoryManager> implements CategoryManagerService {

    @Override
    public Page<CategoryList> selectPage(Page<CategoryList> page, String codes, String cms, int status) {
        Map<String, Object> map = new HashMap<>();
        map.put("codes", codes);
        map.put("cms", cms);
        map.put("status", status);
        List<CategoryList> list = baseMapper.selectPage(page, map);
        page.setRecords(list);
        return page;
    }
}
